home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / prog / aitools.zip / ANIMAL.ESI next >
Text File  |  1986-07-05  |  10KB  |  427 lines

  1. introtext is "
  2.            HI!!  And welcome to ESIE!!  This Artificially Intelligent 
  3.            Inference Engine can do great and wondrous things.
  4.  
  5.            This simple knowledge base is just to give you a small example 
  6.            of what ESIE can do.  ESIE eats this kind of stuff up for 
  7.            lunch and can actually do quite more.  
  8.  
  9.            Anyhow, this knowledge base is prepared to play twenty 
  10.            questions with you.  If you will be good enough to think of 
  11.            an animal, then we will begin. 
  12.  
  13. "
  14.  
  15. goal is type.animal
  16.  
  17. legalanswers are yes no *
  18.  
  19. if backbone is yes
  20. then superphylum is backbone
  21.  
  22. if backbone is no
  23. then superphylum is jellyback
  24.  
  25. question backbone is "Does your animal have a backbone?"
  26.  
  27. if superphylum is backbone
  28. and warm.blooded is yes
  29. then phylum is warm
  30.  
  31. if superphylum is backbone
  32. and warm.blooded is no
  33. then phylum is cold
  34.  
  35. question warm.blooded is "Is the animal warm blooded?"
  36.  
  37. if superphylum is jellyback
  38. and live.prime.in.soil is yes
  39. then phylum is soil
  40.  
  41. if superphylum is jellyback
  42. and live.prime.in.soil is no
  43. then phylum is elsewhere
  44.  
  45. question live.prime.in.soil is "Does your animal live primarily in soil?"
  46.  
  47. if phylum is warm
  48. and has.breasts is yes
  49. then class is breasts
  50.  
  51. if phylum is warm and has.breasts is no
  52. then type.animal is bird/penguin
  53.  
  54. question has.breasts is 
  55. "Normally, does the female of your animal nurse its young with milk?"
  56.  
  57. if phylum is cold
  58. and always.in.water is yes
  59. then class is water
  60.  
  61. if phylum is cold and always.in.water is no
  62. then class is dry
  63.  
  64. question always.in.water is "Is your animal always in water?"
  65.  
  66. if phylum is soil and flat.bodied is yes then type.animal is flatworm
  67.  
  68. if phylum is soil and flat.bodied is no then type.animal is worm/leech
  69.  
  70. question flat.bodied is "Does your animal have a flat body?"
  71.  
  72. if phylum is elsewhere and body.in.segments is yes then class is segments
  73.  
  74. if phylum is elsewhere and body.in.segments is no then class is unified
  75.  
  76. question body.in.segments is "Is the animals body in segments?"
  77.  
  78. if class is breasts and
  79. can.eat.meat is yes
  80. then order is meat
  81.  
  82. if class is breasts and
  83. can.eat.meat is no then
  84. order is vegy
  85.  
  86. question can.eat.meat is "Does your animal eat red meat?"
  87.  
  88. if class is water
  89. and boney is yes
  90. then type.animal is fish
  91.  
  92. if class is water 
  93. and boney is no
  94. then type.animal is shark/ray
  95.  
  96. question boney is "Does your animal have a boney skeleton?"
  97.  
  98. if class is dry
  99. and scally is yes
  100. then order is scales
  101.  
  102. if class is dry
  103. and scally is no
  104. then order is soft
  105.  
  106. question scally is "Is your animal covered with scaled skin?"
  107.  
  108. if class is segments
  109. and shell is yes
  110. then order is shell
  111.  
  112. if class is segments
  113. and shell is no
  114. then type.animal is centiped/milliped/insect
  115.  
  116. question shell is "Does your animal have a shell?"
  117.  
  118. if class is unified
  119. and digest.cells is yes
  120. then order is cells
  121.  
  122. if class is unified and digest.cells is no
  123. then order is stomach
  124.  
  125. question digest.cells is 
  126. "Does your animal use many cells to digest it's food instead of a stomach?"
  127.  
  128. if order is meat
  129. and fly is yes
  130. then type.animal is bat
  131.  
  132. if order is meat
  133. and fly is no
  134. then family is nowings
  135.  
  136. question fly is "Can your animal fly?"
  137.  
  138. if order is vegy
  139. and hooves is yes
  140. then family is hooves
  141.  
  142. if order is vegy and hooves is no then family is feet
  143.  
  144. question hooves is "Does your animal have hooves?"
  145.  
  146. if order is scales
  147. and rounded.shell is yes
  148. then type.animal is turtle
  149.  
  150. if order is scales
  151. and rounded.shell is no
  152. then family is noshell
  153.  
  154. question rounded.shell is "Does the animal have a rounded shell?"
  155.  
  156. if order is soft
  157. and jump is yes
  158. then type.animal is frog
  159.  
  160. if order is soft
  161. and jump is no
  162. then type.animal is salamander
  163.  
  164. question jump is "Does your animal jump?"
  165.  
  166. if order is shell
  167. and tail is yes
  168. then type.animal is lobster
  169.  
  170. if order is shell
  171. and tail is no
  172. then type.animal is crab
  173.  
  174. question tail is "Does your animal have a tail?"
  175.  
  176. if order is cells
  177. and stationary is yes
  178. then family is stationary
  179.  
  180. if order is cells
  181. and stationary is no
  182. then type.animal is jellyfish
  183.  
  184. question stationary is "Is your animal attached permanently to an object?"
  185.  
  186. if order is stomach
  187. and multicelled is yes
  188. then family is multicelled
  189.  
  190. if order is stomach and multicelled is no
  191. then type.animal is protozoa
  192.  
  193. question multicelled is "Is your animal made up of more than one cell?"
  194.  
  195. if family is nowings
  196. and opposing.thumb is yes
  197. then genus is thumb
  198.  
  199. if family is nowings
  200. and opposing.thumb is no
  201. then genus is nothumb
  202.  
  203. question opposing.thumb is "Does your animal have an opposing thumb?"
  204.  
  205. if family is hooves
  206. and two.toes is yes
  207. then genus is twotoes
  208.  
  209. if family is hooves and two.toes is no then genus is onetoe
  210.  
  211. question two.toes is "Does your animal stand on two toes/hooves per foot?"
  212.  
  213. if family is feet
  214. and live.in.water is yes
  215. then genus is water
  216.  
  217. if family is feet
  218. and live.in.water is no
  219. then genus is dry
  220.  
  221. question live.in.water is "Does your animal live in water?"
  222.  
  223. if family is noshell
  224. and limbs is yes
  225. then type.animal is crocodile/alligator
  226.  
  227. if family is noshell
  228. and limbs is no
  229. then type.animal is snake
  230.  
  231. question limbs is "Does your animal have limbs?"
  232.  
  233. if family is stationary and spikes is yes
  234. then type.animal is sea.anemone
  235.  
  236. if family is stationary and spikes is no
  237. then type.animal is coral/sponge
  238.  
  239. question spikes is 
  240. "Does your animal normally have spikes radiating from it's body?"
  241.  
  242. if family is multicelled 
  243. and spiral.shell is yes
  244. then type.animal is snail
  245.  
  246. if family is multicelled
  247. and spiral.shell is no
  248. then genus is noshell
  249.  
  250. question spiral.shell is "Does your animal have a spiral-shaped shell?"
  251.  
  252. if genus is thumb
  253. and prehensile.tail is yes
  254. then type.animal is monkey
  255.  
  256. if genus is thumb
  257. and prehensile.tail is no
  258. then species is notail
  259.  
  260. question prehensile.tail is "Does your animal have a prehensile tail?"
  261.  
  262. if genus is nothumb
  263. and over.400 is yes
  264. then species is 400
  265.  
  266. if genus is nothumb
  267. and over.400 is no
  268. then species is under400
  269.  
  270. question over.400 is "Does an adult normally weigh over 400 pounds?"
  271.  
  272. if genus is twotoes
  273. and horns is yes
  274. then species is horns
  275.  
  276. if genus is twotoes 
  277. and horns is no
  278. then species is nohorns
  279.  
  280. question horns is "Does your animal have horns?"
  281.  
  282. if genus is onetoe
  283. and plating is yes
  284. then type.animal is rhinoceros
  285.  
  286. if genus is onetoe
  287. and plating is no 
  288. then type.animal is horse/zebra
  289.  
  290. question plating is "Is your animal covered with a protective plating?"
  291.  
  292. if genus is water
  293. and hunted is yes
  294. then type.animal is whale
  295.  
  296. if genus is water
  297. and hunted is no
  298. then type.animal is dolphin/porpoise
  299.  
  300. question hunted is "Is your animal, unfortunately, commercially hunted?"
  301.  
  302. if genus is dry
  303. and front.teeth is yes
  304. then species is teeth
  305.  
  306. if genus is dry
  307. and front.teeth is no
  308. then species is noteeth
  309.  
  310. question front.teeth is "Does your animal have large front teeth?"
  311.  
  312. if genus is noshell
  313. and bivalve is yes 
  314. then type.animal is clam/oyster
  315.  
  316. if genus is noshell
  317. and bivalve is no
  318. then type.animal is squid/octopus
  319.  
  320. question bivalve is "Is your animal protected by two half-shells?"
  321.  
  322. if species is notail
  323. and nearly.hairless is yes
  324. then type.animal is man
  325.  
  326. if species is notail
  327. and nearly.hairless is no
  328. then subspecies is hair
  329.  
  330. question nearly.hairless is "Is your animal nearly hairless?"
  331.  
  332. if species is 400
  333. and land.based is yes
  334. then type.animal is bear/tiger/lion
  335.  
  336. if species is 400 and land.based is no
  337. then type.animal is walrus
  338.  
  339. question land.based is "Is your animal land based?"
  340.  
  341. if species is under400
  342. and thintail is yes
  343. then type.animal is cat
  344.  
  345. if species is under400
  346. and thintail is no
  347. then type.animal is coyote/wolf/fox/dog
  348.  
  349. question thintail is "Does your animal have a thin tail?"
  350.  
  351. if species is horns
  352. and one.horn is yes
  353. then type.animal is hippopotamus
  354.  
  355. if species is horns
  356. and one.horn is no
  357. then subspecies is nohorn
  358.  
  359. question one.horn is "Does your animal have one horn?"
  360.  
  361. if species is nohorns
  362. and lives.in.desert is yes
  363. then type.animal is camel
  364.  
  365. if species is nohorns
  366. and lives.in.desert is no
  367. then type.animal is giraffe
  368.  
  369. question lives.in.desert is "Does your animal normally live in the desert?"
  370.  
  371. if species is teeth
  372. and large.ears is yes
  373. then type.animal is rabbit
  374.  
  375. if species is teeth
  376. and large.ears is no
  377. the type.animal is rat/mouse/squirrel/beaver/porcupine
  378.  
  379. question large.ears is "Does your animal have large ears?"
  380.  
  381. if species is noteeth
  382. and pouch is yes then type.animal is kangaroo/koala.bear
  383.  
  384. if species is noteeth
  385. and pouch is no then type.animal is mole/shrew/elephant
  386.  
  387. question pouch is "Does your animal have a pouch?"
  388.  
  389. if subspecies is hair
  390. and long.powerful.arms is yes
  391. then type.animal is orangutan/gorilla/chimpanzie
  392.  
  393. if subspecies is hair
  394. and long.powerful.arms is no
  395. then type.animal is baboon
  396.  
  397. question long.powerful.arms is "Does your animal have long, powerful arms?"
  398.  
  399. if subspecies is nohorn
  400. and fleece is yes
  401. then type.animal is sheep/goat
  402.  
  403. if subspecies is nohorn
  404. and fleece is no
  405. then subsubspecies is nofleece
  406.  
  407. question fleece is "Does your animal have fleece?"
  408.  
  409. if subsubspecies is nofleece
  410. and domesticated is yes
  411. then type.animal is cow
  412.  
  413. if subsubspecies is nofleece
  414. and domesticated is no
  415. then type.animal is deer/moose/antelope
  416.  
  417. question domesticated is "Is your animal domesticated?"
  418.  
  419. answer is "I think your animal is a " type.animal
  420.  
  421. termtext is "
  422.           What do you think?  Was the knowledge base correct?  Did we 
  423.           guess your animal?  Well, as none of us are biologists here at 
  424.           Lightwave, it is a miracle any of the animals are right.  Your 
  425.           suggestions for improvement are always welcome. 
  426. "
  427.